package com.hzp.lolnews.ui.me.view;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Window;
import android.widget.EditText;
import android.widget.Toast;

import com.hzp.lolnews.R;

public class SuggestActivity extends AppCompatActivity implements View.OnClickListener {

    private EditText etAddress;
    private EditText etSuggest;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_suggest);
        initView();
    }

    private void initView() {
        etAddress = (EditText) findViewById(R.id.et_address);
        etSuggest = (EditText) findViewById(R.id.et_suggest);
        findViewById(R.id.suggest_tijiao).setOnClickListener(this);
        Toolbar tool = (Toolbar) findViewById(R.id.suggest_toolbar);
        tool.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    @Override
    public void onClick(View view) {
        String address = etAddress.getText().toString();
        String suggest = etSuggest.getText().toString();
        if(view.getId() == R.id.suggest_tijiao){
            etAddress.setText("");
            etSuggest.setText("");
            Toast.makeText(SuggestActivity.this,"提交成功",Toast.LENGTH_LONG).show();
        }
    }
}
